package com.centit.framework.ip.businessdata.po;

import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


/**
 * create by scaffold 2018-05-22
 *
 * @author guo_jh
 * <p>
 * T_INTERFACE_LOG接口调用日志
 */
@Entity
@Table(name = "T_INTERFACE_LOG")
public class InterfaceLog implements java.io.Serializable {
    private static final long serialVersionUID = 1L;


    /**
     * RECORDID 主键
     */
    @Id
    @Column(name = "RECORDID")

    private String recordid;

    /**
     * SYSTEMFLAG 调用接口标识
     */
    @Column(name = "SYSTEMFLAG")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String systemflag;
    /**
     * METHODFLAG 方法标识
     */
    @Column(name = "METHODFLAG")
    @Length(min = 0, max = 200, message = "字段长度不能小于{min}大于{max}")
    private String methodflag;
    /**
     * RESULTFLAG 结果标识(成功T，失败F)
     */
    @Column(name = "RESULTFLAG")
    @Length(min = 0, max = 4, message = "字段长度不能小于{min}大于{max}")
    private String resultflag;
    /**
     * CREATER 创建人
     */
    @Column(name = "CREATER")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String creater;
    /**
     * CREATE_TIME 创建时间
     */
    @Column(name = "CREATE_TIME")
    private Date createTime;
    /**
     * RESPONSE 返回的信息
     */
    @Column(name = "RESPONSE")
    private String response;
    /**
     * YWFLAG 业务标识(0,业务系统数据，1.ofd文件迁移转换服务)
     */
    @Column(name = "YWFLAG")
    @Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
    private String ywflag;

    // Constructors

    /**
     * default constructor
     */
    public InterfaceLog() {
    }

    /**
     * minimal constructor
     */
    public InterfaceLog(
            String recordid
    ) {


        this.recordid = recordid;

    }

    /**
     * full constructor
     */
    public InterfaceLog(
            String recordid
            , String systemflag, String methodflag, String resultflag, String creater, Date createTime, String response, String ywflag) {


        this.recordid = recordid;

        this.systemflag = systemflag;
        this.methodflag = methodflag;
        this.resultflag = resultflag;
        this.creater = creater;
        this.createTime = createTime;
        this.response = response;
        this.ywflag = ywflag;
    }


    public String getRecordid() {
        return this.recordid;
    }

    public void setRecordid(String recordid) {
        this.recordid = recordid;
    }
    // Property accessors

    public String getSystemflag() {
        return this.systemflag;
    }

    public void setSystemflag(String systemflag) {
        this.systemflag = systemflag;
    }

    public String getMethodflag() {
        return this.methodflag;
    }

    public void setMethodflag(String methodflag) {
        this.methodflag = methodflag;
    }

    public String getResultflag() {
        return this.resultflag;
    }

    public void setResultflag(String resultflag) {
        this.resultflag = resultflag;
    }

    public String getCreater() {
        return this.creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getResponse() {
        return this.response;
    }

    public void setResponse(String response) {
        this.response = response;
    }

    public String getYwflag() {
        return this.ywflag;
    }

    public void setYwflag(String ywflag) {
        this.ywflag = ywflag;
    }


    public InterfaceLog copy(InterfaceLog other) {

        this.setRecordid(other.getRecordid());

        this.systemflag = other.getSystemflag();
        this.methodflag = other.getMethodflag();
        this.resultflag = other.getResultflag();
        this.creater = other.getCreater();
        this.createTime = other.getCreateTime();
        this.response = other.getResponse();
        this.ywflag = other.getYwflag();

        return this;
    }

    public InterfaceLog copyNotNullProperty(InterfaceLog other) {

        if (other.getRecordid() != null) {
            this.setRecordid(other.getRecordid());
        }

        if (other.getSystemflag() != null) {
            this.systemflag = other.getSystemflag();
        }
        if (other.getMethodflag() != null) {
            this.methodflag = other.getMethodflag();
        }
        if (other.getResultflag() != null) {
            this.resultflag = other.getResultflag();
        }
        if (other.getCreater() != null) {
            this.creater = other.getCreater();
        }
        if (other.getCreateTime() != null) {
            this.createTime = other.getCreateTime();
        }
        if (other.getResponse() != null) {
            this.response = other.getResponse();
        }
        if (other.getYwflag() != null) {
            this.ywflag = other.getYwflag();
        }

        return this;
    }

    public InterfaceLog clearProperties() {

        this.systemflag = null;
        this.methodflag = null;
        this.resultflag = null;
        this.creater = null;
        this.createTime = null;
        this.response = null;
        this.ywflag = null;

        return this;
    }
}
